from selenium import webdriver
from selenium.webdriver.common.by import By
import unittest
from time import sleep
from test.login import login


class test_login(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        cls.driver = webdriver.Chrome()
        cls.driver.get("http://localhost:8080")
        cls.driver.implicitly_wait(5)

    @classmethod
    def tearDownClass(cls):
        cls.driver.quit()

    def test_user(self):
        login.login(self)
        self.assertEqual(self.driver.title, "SpringBoot-Plus")


if __name__ == "__main__":
    unittest.main()
